$(document).ready(function() {
	var agesubmit = $.cookie('agesubmit');
	if (agesubmit=='enter') {
		$("#message-screen").hide().css("visibility", "hidden");
		$("#box-message").hide().css("visibility", "hidden");
	}
});

$(window).bind("load", function() {
	$('#message-screen').animate({top:"0px"}, 1000);
	$('#box-message').animate({top:"168px"}, 1000);
	$('#agesubmit').attr("disabled","disabled");
	$('#agecheckbox').click(function(){
		if($(this).prop('checked')){
			$('#agesubmit').removeAttr('disabled');
		}
		else {
			$('#agesubmit').attr("disabled","disabled");   
		}
	});
	$('#agesubmit').click(function(){
	$.cookie('agesubmit', $(this).attr('class'), { path:'/' });
	});
});

$(function(){
	$('#headform :submit').click(function(){
		$.cookie('PAYMENT_AMOUNT', $(this).val(), { path:'/' });
		$.cookie('play', $(this).attr('class'), { path:'/' });
	});
	$('#tailform :submit').click(function(){
		$.cookie('PAYMENT_AMOUNT', $(this).val(), { path:'/' });
		$.cookie('play', $(this).attr('class'), { path:'/' });
	});
});
